package biz

import (
	"code.byted.org/mars/golang_week2/Error"
	"code.byted.org/mars/golang_week2/dao"
	"fmt"
	"github.com/pkg/errors"
)

// GetPeople server get
func GetPeople(ID int64) (*dao.People, error) {
	people, err := dao.GetPeople(ID)
	if errors.Is(err, Error.RecordNotFound) {
		fmt.Printf("ID: %d not found", ID)
		return nil, nil
	}
	return people, err
}
